package com.kczd.entity;

import com.kczd.client.R;
import com.kczd.util.SlideView;

import org.json.JSONException;
import org.json.JSONObject;


/**封装订单起始地信息*/
public class Location {

	private String datetime;//日期时间
	private String origin;//起点
	private String origin_lat;
	private String origin_lng;
	private String terminal;//终点
	private String terminal_lat;
	private String terminal_lng;
	private int type;//类型
	

	private String okey;
	private String u_name;
	private String u_tel;
	private String u_img;
	private String link_pos;
	private String link_lat;
	private String link_lng;
	private String tol_price;
	private String li;
	private String price_qibujia;
	private String price_yuantufei;
	private String price_shichangfei;
	public static String taxiID;
	
	private String ostatus;
	

	private String user_lat;
	private String user_lng;
	public SlideView slideView;
	
	public void Json2Object(String strJson) throws JSONException{
		JSONObject jso = new JSONObject(strJson);
		this.setDatetime(jso.getString("createTime"));
		this.setOrigin(jso.getString("oripos"));
		this.setTerminal(jso.getString("endpos"));
		
		this.setOkey(jso.getString("okey"));
		this.setU_name(jso.getString("u_name"));
		this.setU_tel(jso.getString("u_tel"));
		this.setU_img(jso.getString("u_img"));
		this.setLink_pos(jso.getString("link_pos"));
		this.setTol_price(jso.getString("tol_price"));
		this.setLi(jso.getString("li"));
		this.setPrice_qibujia(jso.getString("price_qibujia"));
		this.setPrice_shichangfei(jso.getString("price_shichangfei"));
		this.setPrice_yuantufei(jso.getString("price_yuantufei"));
		this.setOrigin_lat(jso.getString("origin_lat"));
		this.setOrigin_lng(jso.getString("origin_lng"));
		this.setTerminal_lat(jso.getString("terminal_lat"));
		this.setTerminal_lng(jso.getString("terminal_lng"));
		this.setLink_lat(jso.getString("link_lat"));
		this.setLink_lng(jso.getString("link_lng"));
		this.setOstatus(jso.getString("ostatus"));
		this.setUser_lat(jso.getString("user_lat"));
		this.setUser_lng(jso.getString("user_lng"));
		this.setType(R.mipmap.nothing);
	}

	public void Json2Object(JSONObject jso) throws JSONException{
		this.setDatetime(jso.getString("createTime"));
		this.setOrigin(jso.getString("oripos"));
		this.setTerminal(jso.getString("endpos"));
		
		this.setOkey(jso.getString("okey"));
		this.setU_name(jso.getString("u_name"));
		this.setU_tel(jso.getString("u_tel"));
		this.setU_img(jso.getString("u_img"));
		this.setLink_pos(jso.getString("link_pos"));
		this.setTol_price(jso.getString("tol_price"));
		this.setLi(jso.getString("li"));
		this.setPrice_qibujia(jso.getString("price_qibujia"));
		this.setPrice_shichangfei(jso.getString("price_shichangfei"));
		this.setPrice_yuantufei(jso.getString("price_yuantufei"));
		this.setOrigin_lat(jso.getString("origin_lat"));
		this.setOrigin_lng(jso.getString("origin_lng"));
		this.setTerminal_lat(jso.getString("terminal_lat"));
		this.setTerminal_lng(jso.getString("terminal_lng"));
		this.setLink_lat(jso.getString("link_lat"));
		this.setLink_lng(jso.getString("link_lng"));
		this.setOstatus(jso.getString("ostatus"));
		this.setUser_lat(jso.getString("user_lat"));
		this.setUser_lng(jso.getString("user_lng"));
		this.setType(R.mipmap.nothing);
	}
	
	public Location() {
	}
	public Location(String datetime, String origin, String terminal,
			int type) {
		super();
		this.datetime = datetime;
		this.origin = origin;
		this.terminal = terminal;
		this.type = type;
	}


	public String getTaxiID() {
		return taxiID;
	}

	public void setTaxiID(String taxiID) {
		this.taxiID = taxiID;
	}

	public String getU_name() {
		return u_name;
	}
	public void setU_name(String u_name) {
		this.u_name = u_name;
	}
	public String getOstatus() {
		return ostatus;
	}
	public void setOstatus(String ostatus) {
		this.ostatus = ostatus;
	}
	public String getUser_lat() {
		return user_lat;
	}
	public void setUser_lat(String user_lat) {
		this.user_lat = user_lat;
	}
	public String getUser_lng() {
		return user_lng;
	}
	public void setUser_lng(String user_lng) {
		this.user_lng = user_lng;
	}
	public String getOrigin_lat() {
		return origin_lat;
	}
	public void setOrigin_lat(String origin_lat) {
		this.origin_lat = origin_lat;
	}
	public String getOrigin_lng() {
		return origin_lng;
	}
	public void setOrigin_lng(String origin_lng) {
		this.origin_lng = origin_lng;
	}
	public String getTerminal_lat() {
		return terminal_lat;
	}
	public void setTerminal_lat(String terminal_lat) {
		this.terminal_lat = terminal_lat;
	}
	public String getTerminal_lng() {
		return terminal_lng;
	}
	public void setTerminal_lng(String terminal_lng) {
		this.terminal_lng = terminal_lng;
	}
	public String getLink_lat() {
		return link_lat;
	}
	public void setLink_lat(String link_lat) {
		this.link_lat = link_lat;
	}
	public String getLink_lng() {
		return link_lng;
	}
	public void setLink_lng(String link_lng) {
		this.link_lng = link_lng;
	}
	public String getU_tel() {
		return u_tel;
	}
	public void setU_tel(String u_tel) {
		this.u_tel = u_tel;
	}
	public String getU_img() {
		return u_img;
	}
	public void setU_img(String u_img) {
		this.u_img = u_img;
	}
	public String getLink_pos() {
		return link_pos;
	}
	public String getTol_price() {
		return tol_price;
	}
	public void setTol_price(String tol_price) {
		this.tol_price = tol_price;
	}
	public String getPrice_qibujia() {
		return price_qibujia;
	}
	public void setPrice_qibujia(String price_qibujia) {
		this.price_qibujia = price_qibujia;
	}
	public String getPrice_yuantufei() {
		return price_yuantufei;
	}
	public void setPrice_yuantufei(String price_yuantufei) {
		this.price_yuantufei = price_yuantufei;
	}
	public String getPrice_shichangfei() {
		return price_shichangfei;
	}
	public void setPrice_shichangfei(String price_shichangfei) {
		this.price_shichangfei = price_shichangfei;
	}
	public String getLi() {
		return li;
	}
	public void setLi(String li) {
		this.li = li;
	}
	public void setLink_pos(String link_pos) {
		this.link_pos = link_pos;
	}
	public String getOkey() {
		return okey;
	}
	public void setOkey(String string) {
		this.okey = string;
	}
	public String getDatetime() {
		return datetime;
	}
	public void setDatetime(String datetime) {
		this.datetime = datetime;
	}
	public String getOrigin() {
		return origin;
	}
	public void setOrigin(String origin) {
		this.origin = origin;
	}
	public String getTerminal() {
		return terminal;
	}
	public void setTerminal(String terminal) {
		this.terminal = terminal;
	}
	public int getType() {
		return type;
	}
	public void setType(int type) {
		this.type = type;
	}


}
